//
//  _BaseCert.m
//  TestProject
//
//  Created by 武侠 on 2022/2/18.
//  Copyright © 2022 zhulong. All rights reserved.
//

#import "_BaseCert.h"

@implementation _BaseCert

- (nullable instancetype)initWithData:(NSData *)data {
    self = [super init];
    if (self) {
        self.data = data;
        [self loadCertData];
    }
    return self;
}

// 解析证书：子类重写
- (void)loadCertData {
}

// 是否有效
+ (BOOL)isValid:(NSData *)data {
    return data != nil && data.length > 0;
}

@end
